package com.example.seckilldemo.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/demo")
@Api(tags = "测试接口")
public class TestController {

    /**
     * 测试页面跳跳转
     * @param model
     * @return
     */
    @RequestMapping("hello")
    @ApiOperation("测试模板引擎")
    public String hello(Model model){
        model.addAttribute("name","我不甘心");
        return "/hello";
    }
}
